SftTree/OCX 7.0

SftTreeItems.ItemIndex Property

Softel vdm, Inc.

Returns the item index given an item ID.

Syntax       

Get

VB.NET

ItemIndex = object.ItemIndex(ByVal ID As Integer)  As Integer

VB

ItemIndex = object.ItemIndex(ByVal ID As Long)  As Long

C#.NET

int ItemIndex = object.get_ItemIndex(int ID);

VC++

long ItemIndex = object->ItemIndex[long ID];
long ItemIndex = object->GetItemIndex(long ID);

C

HRESULT object->get_ItemIndex(long ID, long* ItemIndex);

Delphi

ItemIndex := object.ItemIndex[ID : Integer]   : Integer;

object

A SftTreeItems object.

ID

The item ID of the item whose index is to be returned.

ItemIndex

Returns the item index given an item ID.  -1 is returned if no item has a matching ID.

Comments

The ItemIndex property returns the item index given an item ID.

The item ID returned by the Item.ID property does not change throughout the lifetime of an item.  Even if an item changes its index position because other items are deleted or inserted, the item ID remains constant.  The item index describes the zero-based position of an item in a tree control.

See Also  SftTreeItems Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com